<!-- 结构 -->
<script setup lang="ts">
import { useCounterStore } from '@/stores/counter';


// store中有状态和函数
const store = useCounterStore()

</script>

<!-- JS逻辑 -->
<template>
    <div class="child-page">

        <div>子组件 - {{ store.count }}</div>

    </div>
</template>

<!-- 样式 -->
<style lang="css" scoped>
.child-page {
    width: 200px;
    height: 200px;
    background-color: gold;
    text-align: center;
}
</style>